//
//  WebViewViewController.h
//  Init
//
//  Created by zhaoshijie on 20/01/2018.
//  Copyright © 2018 zhaoshijie. All rights reserved.
//


#import <WebKit/WebKit.h>
#import "EBMBaseViewController.h"

typedef enum : NSUInteger {
    WebViewType_Default = 0,
    WebViewType_Service = 1,        //  客服
    WebViewType_Share = 2,        //  分享
    
} WebViewType;


@interface EBMBaseWebViewViewController : EBMBaseViewController<WKNavigationDelegate,WKScriptMessageHandler,WKUIDelegate>

//  网址
@property(nonatomic,strong)NSString *urlString;
//  标题
@property(nonatomic,strong)NSString *titleString;
//  类型
@property(nonatomic,assign)WebViewType webViewType;




#pragma mark --------------创建控件--------------

//  进度条
@property(nonatomic,strong)UIProgressView *progressView;
//  网页
@property(nonatomic,strong)WKWebView *webView;
//  配置
@property(nonatomic,strong)WKUserContentController* userContent;

#pragma mark --------------方法--------------


/**
 初始化方法

 @param urlString 网址
 @param titleString 标题
 @return 对象
 */
- (instancetype)initWithUrlString:(NSString *)urlString
                      titleString:(NSString *)titleString;


/**
 初始化方法
 
 @param urlString 网址
 @param titleString 标题
 @param type 类型
 @return 对象
 */
- (instancetype)initWithUrlString:(NSString *)urlString
                      titleString:(NSString *)titleString
                             type:(WebViewType)type;


@end
